package com.capsule.chapter1.controller;

import com.capsule.chapter1.pojo.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String hi(String name){
        return new StringBuilder("hi,I'm ").append(new User().setName(name)).toString();
    }
}
